|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.index.lucene.LuceneIndexBatchInserterImpl
public class LuceneIndexBatchInserterImpl
The implementation of LuceneIndexBatchInserter.
| Constructor Summary | |
|---|---|
LuceneIndexBatchInserterImpl(org.neo4j.kernel.impl.batchinsert.BatchInserter inserter)
|
|
| Method Summary | |
|---|---|
protected void |
fillDocument(org.apache.lucene.document.Document document,
long nodeId,
String key,
Object value)
|
protected org.apache.lucene.search.Query |
formQuery(String key,
Object value)
|
org.neo4j.kernel.impl.batchinsert.BatchInserter |
getBatchInserter()
|
protected String |
getDirName()
|
IndexService |
getIndexService()
|
protected org.apache.lucene.document.Field.Index |
getIndexStrategy()
|
IndexHits<Long> |
getNodes(String key,
Object value)
Queries the lucene index for hits given the key and value
. |
long |
getSingleNode(String key,
Object value)
|
void |
index(long node,
String key,
Object value)
Adds an entry to the index. |
void |
optimize()
Performs a Lucene optimize on the index files. |
void |
shutdown()
Shuts down this index and closes its underlying lucene index files. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LuceneIndexBatchInserterImpl(org.neo4j.kernel.impl.batchinsert.BatchInserter inserter)
inserter - the BatchInserter to use.| Method Detail |
|---|
protected String getDirName()
public void index(long node,
String key,
Object value)
LuceneIndexBatchInserter
index in interface LuceneIndexBatchInserternode - the node to associate with the value in the index
with name key.key - which index to put it in.value - the value to associate node with.
protected void fillDocument(org.apache.lucene.document.Document document,
long nodeId,
String key,
Object value)
protected org.apache.lucene.document.Field.Index getIndexStrategy()
public void shutdown()
LuceneIndexBatchInserter
shutdown in interface LuceneIndexBatchInserter
public IndexHits<Long> getNodes(String key,
Object value)
LuceneIndexBatchInserterkey and value
. The usage of LuceneIndexBatchInserter.getNodes(String, Object),
LuceneIndexBatchInserter.getSingleNode(String, Object) should be as separated as possible
from the usage of LuceneIndexBatchInserter.index(long, String, Object). so that the
performance penalty gets as small as possible. Also see
LuceneIndexBatchInserter.optimize() for separation between writes and reads.
getNodes in interface LuceneIndexBatchInserterkey - the index.value - the value to query for.
protected org.apache.lucene.search.Query formQuery(String key,
Object value)
public void optimize()
LuceneIndexBatchInserter
optimize in interface LuceneIndexBatchInserterIndexWriter.optimize()
public long getSingleNode(String key,
Object value)
getSingleNode in interface LuceneIndexBatchInserterkey - the index key to query.value - the value to query for.
public IndexService getIndexService()
getIndexService in interface LuceneIndexBatchInserterIndexService
interface for convenience. Goes well with an instance from
BatchInserter.getGraphDbService().public org.neo4j.kernel.impl.batchinsert.BatchInserter getBatchInserter()
getBatchInserter in interface LuceneIndexBatchInserterBatchInserter used in conjunction with this index
batch inserter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||